﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ChangePSW.aspx.cs" Inherits="WinnerCMS.WebUI.Admin.Admin.ChangePSW" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <%: Styles.Render("~/Content/Bootstrap/css") %>
    <%: Scripts.Render("~/Scripts/AdminBase") %>
    <script type="text/javascript">
        function CheckPSW1() {
            if (document.getElementById("txtOldPSW").value == "") {
                alert("请输入旧密码！！");
                return false;
            }
            if (document.getElementById("txtNew_PSW1").value == "" || document.getElementById("txtNew_PSW2").value == "") {
                alert("密码不能为空。");
                return false;
            }

            if (document.getElementById("txtNew_PSW1").value != document.getElementById("txtNew_PSW2").value) {
                alert("两个密码不匹配！！");
                document.getElementById("txtNew_PSW1").focus();
                return false;
            }
            return true;
        }
        function CheckPSW2() {
            if (document.getElementById("txtUserName").value == "") {
                alert("请输入用户名！！");
                return false;
            }
            if (document.getElementById("txtPassword1").value == "" || document.getElementById("txtPassword2").value == "") {
                alert("密码不能为空。");
                return false;
            }

            if (document.getElementById("txtPassword1").value != document.getElementById("txtPassword2").value) {
                alert("两个密码不匹配！！");
                document.getElementById("txtPassword1").focus();
                return false;
            }
            return true;
        }
    </script>
    <style>
        .table td:first-child {
            text-align: right;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <table class="table">
            <tr>
                <td>用户名：
                </td>
                <td>
                    <asp:Label ID="lblUserName" runat="server" />
                </td>
            </tr>
            <tr>
                <td>他的旧密码：
                </td>
                <td>
                    <asp:TextBox ID="txtOldPSW" runat="server" TextMode="Password" />
                    <span style="color: #ff0000">*</span>
                </td>
            </tr>
            <tr>
                <td>他的新密码：
                </td>
                <td>
                    <asp:TextBox ID="txtNew_PSW1" runat="server" TextMode="Password">
                    </asp:TextBox>
                    <span style="color: #ff0000">*</span>
                </td>
            </tr>
            <tr>
                <td>确定新密码：
                </td>
                <td>
                    <asp:TextBox ID="txtNew_PSW2" runat="server" TextMode="Password">
                    </asp:TextBox>
                    <span style="color: #ff0000">*</span>
                </td>
            </tr>
        </table>
        <div style="margin-left: auto; margin-right: auto; width: 200px; text-align: center;">
            <asp:Button ID="btnChangePSW" runat="server" Text="确定" OnClick="btnChangePSW_Click"
                EnableViewState="False" CssClass="btn btn-default" />
        </div>

        <asp:Label ID="lblMessage" runat="server" Font-Bold="True"></asp:Label>

    </form>
</body>
</html>
